
package camps;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.HashMap;
import javax.servlet.http.HttpServletRequest;
import org.apache.struts2.ServletActionContext;

public class GetCampList {
    private String campID; 
    private String campDate;   
    
    public GetCampList() {
        
        
    }
    
    public String execute() throws Exception {
        
         camps.CampList ci = new camps.CampList();
 
             //由資料庫中讀出該項商品的資訊
            db.NWDB mydb=new db.NWDB();
        
//            ArrayList<HashMap<String,Object>> hm=mydb.getCampListByDateCampID(campDate,campID);
            ArrayList<HashMap<String,Object>> hm=mydb.getCampListByDateCampID(campDate,campID);
            HttpServletRequest request = ServletActionContext.getRequest();     
            request.setAttribute("camplist", hm);
            
        return "success";        
    }

    public String getCampID() {
        return campID;
    }

    public void setCampID(String campID) {
        this.campID = campID;
    }

    public String getCampDate() {
        return campDate;
    }

    public void setCampDate(String campDate) {
        this.campDate = campDate;
    }
}